#ifndef __MESH_H__
#define __MESH_H__

#include "IMesh.h"
#include "IBoundingVolume.h"
#include "IMeshBuffer.h"

namespace steam
{
	namespace coal
	{
		class Mesh : public IMesh
		{
		public:

			const VertexVector& getVertices() const;

			const NormalVector& getNormals() const;

			const TexCoordVector& getTexCoords() const;

			unsigned int getMeshBufferCount() const;

			const IMeshBuffer* getMeshBuffer( unsigned int index ) const;

			std::string getMeshName() const;

			const base::IBoundingVolume* getBoundingVolume() const;

			void addMeshBuffer(IMeshBuffer* meshBuffer);

			void addVertex(const Vertex& vertex);

			void addNormal(const Normal& normal);

			void addTexCoord(const TexCoord& texcoord);

			void addMaterial(IMaterial* material);

			void setMeshName(const char* name);

			const IMaterial* getMaterialByName(std::string name) const;

			const MaterialVector& getMaterials() const;

		private:

			MeshBufferVector m_meshBuffers;

			VertexVector m_vertices;

			NormalVector m_normals;

			TexCoordVector m_texcoords;

			MaterialVector m_materials;

			std::string m_name;

		};
	}

}

#endif